{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tensorflow Version: 2.0.0-alpha0\n"
     ]
    }
   ],
   "source": [
    "print('Tensorflow Version: {}'.format(tf.__version__))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = pd.read_csv('dataset/Advertising.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>TV</th>\n",
       "      <th>radio</th>\n",
       "      <th>newspaper</th>\n",
       "      <th>sales</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>230.1</td>\n",
       "      <td>37.8</td>\n",
       "      <td>69.2</td>\n",
       "      <td>22.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>44.5</td>\n",
       "      <td>39.3</td>\n",
       "      <td>45.1</td>\n",
       "      <td>10.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>17.2</td>\n",
       "      <td>45.9</td>\n",
       "      <td>69.3</td>\n",
       "      <td>9.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>151.5</td>\n",
       "      <td>41.3</td>\n",
       "      <td>58.5</td>\n",
       "      <td>18.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>180.8</td>\n",
       "      <td>10.8</td>\n",
       "      <td>58.4</td>\n",
       "      <td>12.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0     TV  radio  newspaper  sales\n",
       "0           1  230.1   37.8       69.2   22.1\n",
       "1           2   44.5   39.3       45.1   10.4\n",
       "2           3   17.2   45.9       69.3    9.3\n",
       "3           4  151.5   41.3       58.5   18.5\n",
       "4           5  180.8   10.8       58.4   12.9"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x1bc84e4cb38>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO2dfYwd13nen5fLK2ZJC1qqogVqLYp0YIix7FqUFqk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37j7ZskzUiskZELowfA/gwgGcwHMOt0W63AvhmOxYWxmT/owD+eRTtcB2A1+NbeV9J+IA/juH5AYZj+VQUHbAJwHsAfL9p+7KIfKT3ADimql8feSq482MaS6jnR0TWichE9HgcwD/D0K9/AMBvRbslz018zn4LwH6NVjQzaXu11mI190YMV6R/BOAP27bH0fZ3Y7hSfgTAs7H9GPq2vgPgh9Hvi9u2NWMMD2B46zrAcJbwWZP9GN4G/nF0ro4CmGrbfoux/I/I1qejL9H6kf3/MBrLCQAfadv+lPH8Uwxvs58GcDj6uTHE85MxliDPD4B/DGAmsvsZAP8h2v5uDC80zwF4CMCqaPsvRX8/Fz3/bpv3YSo9IYQEiu8uFEIIIQYo4IQQEigUcEIICRQKOCGEBAoFnBBCAoUCTgghgUIBJ4SQQPn/6Whwwbv0RUUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data.TV, data.sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x1bc84ef97b8>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO2dfYxc1XnGn3fXA6whYU0wFDY4plJkEuJil1ViyVUVuw1OAgEHklBEIqpE9T+JFFzqZhNFYJpEbOMmpFKrqk5BISqlJjHZQByVInBKgwrpOms+LIySBgysLbwRXgJ4gfHu2z9mxp6dved+nn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size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data.radio, data.sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x1bc82958d68>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO2df5Ad1XXnv2eeHjADiUeEMQVjBpGUS8RYZWRNOdrVVsqSNyEGYyYocdblJKTiiv5xag2r0ma861pwmS20ITa7W0m5lgSv8YYiIoiMiXGFdYESylQgkSzJgkjETrCAsRbkRYMNGpbR6Owf7/XQr6dv9+3f9/b7fqpU0rT6vb493f29p7/33HNFVUEIIcQ/RppuACGEkHxQwAkhxFMo4IQQ4ikUcEII8RQKOCGEeMqaOg920UUX6bp16+o8JCGEeM+BAwd+qKoT0e21Cvi6deuwf//+Og9JCCHeIyLH47bTQiGEEE+hgBNCiKdQwAkhxFMo4IQQ4ikUcEII8ZRas1DIcDF3cB53PvocfrCwiEvHR7HrmvWY2TjZdLMIaQ0UcFIJcwfn8ZmHjmBxaRkAML+wiM88dAQAKOKElAQtFFIJdz763Ip4BywuLePOR59rqEWEtA8KOKmEHywsZtpOCMkOBZxUwqXjo5m2E0KyQwEnlbDrmvUY7XYGto12O9h1zfqGWkRI++AgJqmEYKCSWSiEVAcFnFTGzMZJCnZBmIpJkqCAE+IoTMUkadADJ8RRmIpJ0qCAE+IoTMUkaVDACXEUpmKSNCjghFTM3MF5bNn9OK6Y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Ve3xFIBxEbmknpZWj+sCPgngxdDPL/W3eYuIrAOwEcDTAC5W1RNAT+QBvLO5luXmvwL49wDO9n/+KQALqnqm/7Nv1+ynAZwE8D/7ttCfiMj58Pxaqeo8gD8A8AJ6wv0agAPw+1qFMV2f1mlIGNcFXGK2eZv3KCIXANgL4GZV/VHT7SmKiHwEwCuqeiC8OWZXn67ZGgDvB/AlVd0I4A14ZpfE0feEbwBwBYBLAZyPnr0QxadrZYPv92Mirgv4SwAuC/38LgA/aKgthRCRLnrifZ+qPtTf/HLwOtf/+5Wm2peTLQA+KiLfR8/e2oZeRD7ef00H/LtmLwF4SVWf7v/8IHqC7vu1+tcAnlfVk6q6BOAhAP8Sfl+rMKbr0xoNicN1Af97AO/uj5Sfg96gy8MNtykzfV/4HgBHVfWLof96GMBN/X/fBOBrdbetCKr6GVV9l6quQ+/aPK6qnwCwD8Cv9Hfz6rxU9f8AeFFE1vc3fQjAP8Dza4WedbJZRMb692NwXt5eqwim6/MwgN/sZ6NsBvBaYLW0AlV1+g+AawH8I4B/AvAfm25PznP4V+i9tn0HwKH+n2vR84sfA/Dd/t8XNt3WAuf4QQBf7//7pwH8HYDvAfhzAOc23b6M53I1gP396zUHYG0brhWAzwE4BuAZAP8LwLk+XisA96Pn4y+hF2F/0nR90LNQ/qivH0fQy8Jp/BzK+sOp9IQQ4imuWyiEEEIMUMAJIcRTKOCEEOIpFHBCCPEUCjghhHgKBZwQQjyFAk4IIZ7y/wEID4luFzx3PwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data.newspaper, data.sales)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = data.iloc[:, 1:-1]\n",
    "y = data.iloc[:, -1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = tf.keras.Sequential([tf.keras.layers.Dense(10, input_shape=(3,), activation='relu'),\n",
    "                             tf.keras.layers.Dense(1)]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "dense (Dense)                (None, 10)                40        \n",
      "_________________________________________________________________\n",
      "dense_1 (Dense)              (None, 1)                 11        \n",
      "=================================================================\n",
      "Total params: 51\n",
      "Trainable params: 51\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.compile(optimizer='adam',\n",
    "              loss='mse'\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/100\n",
      "200/200 [==============================] - 0s 459us/sample - loss: 1829.4733\n",
      "Epoch 2/100\n",
      "200/200 [==============================] - 0s 50us/sample - loss: 1561.3462\n",
      "Epoch 3/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 1316.3282\n",
      "Epoch 4/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 1112.0714\n",
      "Epoch 5/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 921.5663\n",
      "Epoch 6/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 765.0831\n",
      "Epoch 7/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 639.6971\n",
      "Epoch 8/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 533.4047\n",
      "Epoch 9/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 454.0040\n",
      "Epoch 10/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 393.3748\n",
      "Epoch 11/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 348.0167\n",
      "Epoch 12/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 315.7339\n",
      "Epoch 13/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 293.8748\n",
      "Epoch 14/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 272.8150\n",
      "Epoch 15/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 255.2069\n",
      "Epoch 16/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 240.8734\n",
      "Epoch 17/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 227.1232\n",
      "Epoch 18/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 212.4029\n",
      "Epoch 19/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 197.5744\n",
      "Epoch 20/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 180.4940\n",
      "Epoch 21/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 163.4126\n",
      "Epoch 22/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 145.1405\n",
      "Epoch 23/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 129.7150\n",
      "Epoch 24/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 116.6380\n",
      "Epoch 25/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 106.8021\n",
      "Epoch 26/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 97.3757\n",
      "Epoch 27/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 88.1950\n",
      "Epoch 28/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 80.7782\n",
      "Epoch 29/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 73.5035\n",
      "Epoch 30/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 67.5965\n",
      "Epoch 31/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 61.5103\n",
      "Epoch 32/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 56.6056\n",
      "Epoch 33/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 51.4852\n",
      "Epoch 34/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 47.2848\n",
      "Epoch 35/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 43.3768\n",
      "Epoch 36/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 39.3469\n",
      "Epoch 37/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 36.2325\n",
      "Epoch 38/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 33.3151\n",
      "Epoch 39/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 30.5939\n",
      "Epoch 40/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 28.1723\n",
      "Epoch 41/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 25.9956\n",
      "Epoch 42/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 24.0207\n",
      "Epoch 43/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 22.1637\n",
      "Epoch 44/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 20.6579\n",
      "Epoch 45/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 19.2667\n",
      "Epoch 46/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 17.9667\n",
      "Epoch 47/100\n",
      "200/200 [==============================] - ETA: 0s - loss: 17.53 - 0s 35us/sample - loss: 16.7934\n",
      "Epoch 48/100\n",
      "200/200 [==============================] - 0s 50us/sample - loss: 15.7377\n",
      "Epoch 49/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 14.7100\n",
      "Epoch 50/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 13.7919\n",
      "Epoch 51/100\n",
      "200/200 [==============================] - 0s 20us/sample - loss: 12.9859\n",
      "Epoch 52/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 12.2751\n",
      "Epoch 53/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 11.5514\n",
      "Epoch 54/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 10.9748\n",
      "Epoch 55/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 10.4464\n",
      "Epoch 56/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 9.9473\n",
      "Epoch 57/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 9.4517\n",
      "Epoch 58/100\n",
      "200/200 [==============================] - 0s 50us/sample - loss: 9.0411\n",
      "Epoch 59/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 8.6966\n",
      "Epoch 60/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 8.3829\n",
      "Epoch 61/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 8.0465\n",
      "Epoch 62/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 7.7576\n",
      "Epoch 63/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 7.5218\n",
      "Epoch 64/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 7.2844\n",
      "Epoch 65/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 7.0496\n",
      "Epoch 66/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 6.8413\n",
      "Epoch 67/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 6.6105\n",
      "Epoch 68/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 6.4159\n",
      "Epoch 69/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 6.2300\n",
      "Epoch 70/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 6.1019\n",
      "Epoch 71/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 5.9309\n",
      "Epoch 72/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 5.7821\n",
      "Epoch 73/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 5.7112\n",
      "Epoch 74/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 5.5567\n",
      "Epoch 75/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 5.4485\n",
      "Epoch 76/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 5.3419\n",
      "Epoch 77/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 5.2106\n",
      "Epoch 78/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 5.0796\n",
      "Epoch 79/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 4.9895\n",
      "Epoch 80/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.8950\n",
      "Epoch 81/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 4.8010\n",
      "Epoch 82/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 4.7484\n",
      "Epoch 83/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.6457\n",
      "Epoch 84/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.5720\n",
      "Epoch 85/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.5078\n",
      "Epoch 86/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.4543\n",
      "Epoch 87/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 4.3918\n",
      "Epoch 88/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 4.3420\n",
      "Epoch 89/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.2943\n",
      "Epoch 90/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 4.2421\n",
      "Epoch 91/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 4.1927\n",
      "Epoch 92/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 4.1485\n",
      "Epoch 93/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 4.1056\n",
      "Epoch 94/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 4.0607\n",
      "Epoch 95/100\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "200/200 [==============================] - 0s 30us/sample - loss: 4.0218\n",
      "Epoch 96/100\n",
      "200/200 [==============================] - 0s 30us/sample - loss: 3.9797\n",
      "Epoch 97/100\n",
      "200/200 [==============================] - 0s 35us/sample - loss: 3.9409\n",
      "Epoch 98/100\n",
      "200/200 [==============================] - 0s 40us/sample - loss: 3.9056\n",
      "Epoch 99/100\n",
      "200/200 [==============================] - 0s 45us/sample - loss: 3.8840\n",
      "Epoch 100/100\n",
      "200/200 [==============================] - 0s 25us/sample - loss: 3.8501\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<tensorflow.python.keras.callbacks.History at 0x1bc852c70f0>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(x, y, epochs=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "test = data.iloc[:10, 1:-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[22.688574 ],\n",
       "       [14.024084 ],\n",
       "       [ 7.5851073],\n",
       "       [19.333755 ],\n",
       "       [13.577582 ],\n",
       "       [ 6.6950374],\n",
       "       [11.60217  ],\n",
       "       [11.153384 ],\n",
       "       [ 1.2531877],\n",
       "       [11.343028 ]], dtype=float32)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.predict(test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "test = data.iloc[:10, -1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    22.1\n",
       "1    10.4\n",
       "2     9.3\n",
       "3    18.5\n",
       "4    12.9\n",
       "5     7.2\n",
       "6    11.8\n",
       "7    13.2\n",
       "8     4.8\n",
       "9    10.6\n",
       "Name: sales, dtype: float64"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
